<body>
   <div style="border: 1px solid; width: 400px; height: 400px" id="test"></div>
</body>
<style>
   * {
      margin: 0;
   }
   canvas:focus {
      outline: none;
   }
</style>
<script type="module">
   import useDraw from './useDraw.js';
   const el = document.getElementById('test');
   let draw = useDraw();
   draw.init(el, {
      onComplete: (points) => {
         console.log('points', points);
      },
   });
</script>
